<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>myElectron</title>
	</head>
	<body>
		<p>按ESE退出全屏</p>
		<button id="closeBtn" onclick="close()">点击关闭软件</button>
		<script type="text/javascript">
			var closeBtn = document.getElementById("closeBtn");
			closeBtn.onclick=function(){
				if(navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Chrome") != -1){
				       window.location.href = "about:blank";
				       window.close();
				   }else{
				       window.opener = null;
				       window.open("", "_self");
				       window.close();
				   }
			}
		</script>
	</body>
</html>
